package com.example.springbootdemo.controller;

import com.example.hellospringbootstarterautoconfigure.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: lfh
 * @date: 2024/3/26 21:10
 * @Version: 1.0
 * @description:
 */
@RestController
public class HelloController {

    @Autowired
    private HelloService helloService;

    @GetMapping("/hello")
    public String hello(@RequestParam("name") String name){
        return helloService.sayHello(name);
    }
}
